package com.qeegoo.b2bautozityp.moudle.detail.adapter;


import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.qeegoo.b2bautozityp.moudle.detail.bean.WareHouseBean;

import java.util.List;

/**
 * Created by HongQian.Wang on 2017/10/21.
 */

class GoodsQualityAdapter extends BaseAdapter {
    private List<WareHouseBean.DataBean> qualityList;

    public GoodsQualityAdapter(List<WareHouseBean.DataBean> qualityList) {
        this.qualityList = qualityList;
    }

    @Override
    public int getCount() {
        return qualityList == null ? 0 : qualityList.size();
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int position, View view, ViewGroup parent) {
        WareHouseBean.DataBean dataBean = qualityList.get(position);
        TextView textView = new TextView(parent.getContext());
        textView.setText(dataBean.getName());
        return textView;
    }
}
